package lab1;

public abstract class Soup implements Item{
    Taste taste;
}

class EggSoup extends Soup{

    @Override
    public String getItemName() {
        return "紫菜蛋花汤";
    }

    @Override
    public float getPrice() {
        return 2;
    }

    @Override
    public Taste getTaste() {
        return taste;
    }

    @Override
    public void setTaste(Taste taste) {
        this.taste = taste;
        System.out.println("汤口味："+taste);
    }
}

class WaxSoup extends Soup{

    @Override
    public String getItemName() {
        return "冬瓜龙骨汤";
    }

    @Override
    public float getPrice() {
        return 4;
    }

    @Override
    public Taste getTaste() {
        return taste;
    }

    @Override
    public void setTaste(Taste taste) {
        this.taste = taste;
        System.out.println("汤口味："+taste);
    }
}
